{% extends 'layout.html'%}

{%block content%}
<div class="listbox">
    <h1>{{content.title}}</h1>
    <p class="cDefault">
        作者：<span class="cInfo">{{content.user.username}}</span>
        时间：<span class="cInfo">{{content.addTime|date('Y年m月d日h:i:s',-8*60)}}</span>
        阅读：<span class="cInfo">{{content.views}}</span>
        评论：<span class="cInfo">{{content.comments.length}}</span>
    </p>
    <dfn>
       {{content.content}}
    </dfn>
</div>
<!--评论-->
<div class="listbox message" style="height: auto">
<h3 class="textleft"><strong>评论</strong><span class="em">一共有<em id="messageCount"></em>评论</span></h3>
    {% if userInfo._id %}
    <p class="textleft"></p>
    <p class="textleft clear">
        <textarea id="messageContent" cols="50"  rows="3"></textarea>
        <input type="hidden"  value="{{content.id}}" id="contentId" />
        <button id="messageBtn" class="submit">提交</button>
    </p>
     {%else%}
    <p class="bgDanger" style="line-height: 30px">你还没有登录，请先登录</p>
     {%endif%}
    <div class="messageList">

    </div>
    <!--分页-->
    <div class="page">
        <ul class="clear">
         <li class="prev">
            <a href="">上一页</a>
         </li>
         <li></li>
         <li class="next">
             <a href="">下一页</a>
         </li>
        </ul>
    </div>

</div>
<script src="/public/js/comment.js"></script>
{%endblock%}